import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    songs: [],
    idList:"",
    nameList:"",
    status: false,  // false表示没登录 true表示登录
    songIdVal:0,
songs2:[],//播放页到个人页的歌曲
  },
  mutations: {
    "Songs": function (state, value) {
      state.songs.push(value);
    },
    'getId':function(state,id){
      state.idList = id
    },
    'getName':function(state,name){
      state.nameList = name
    },
    "LOGIN": function (state,playload) {
      state.status = playload;
    },
    "SendSongId":function(state,val){
      state.songIdVal=val;
    },
"getSONG":function(state,song){
      state.songs2.push(song)
    }
  },
  actions: {
  },
  modules: {
  }
})
